package org.mzyyn.qr.controller;

import org.mzyyn.qr.constants.AppletsApiUrlMapping;
import org.mzyyn.qr.dto.assistance.AssistanceSuccessDTO;
import org.mzyyn.qr.dto.prize.PrizeRecordListDTO;
import org.mzyyn.qr.service.AssistanceRecordService;
import org.mzyyn.qr.service.PrizeRecordService;
import org.qr.xiaocao.common.entity.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 奖品记录表 前端控制器
 * </p>
 *
 * @author lipeng
 * @since 2024-09-03
 */
@RestController
public class PrizeRecordController {

    @Autowired
    PrizeRecordService prizeRecordService;

    /**
     * 奖品列表
     * @return
     */
    @PostMapping(AppletsApiUrlMapping.PRIZE_RECORD_PAGE_LIST)
    public BaseResult prizeRecordPage(
            @RequestBody @Validated PrizeRecordListDTO prizeRecordListDTO
    ){

        return BaseResult.ok( prizeRecordService.getRecordList(prizeRecordListDTO));
    }
}
